-- Test @@OPTIONS value changes when unsetting/setting CONCAT_NULL_YIELDS_NULL
SELECT @@OPTIONS AS OriginalOptionsValue;
SET CONCAT_NULL_YIELDS_NULL OFF;
SELECT 'abc' + NULL AS ResultWhen_OFF, @@OPTIONS AS OptionsValueWhen_OFF;
GO

SET CONCAT_NULL_YIELDS_NULL ON;
SELECT 'abc' + NULL AS ResultWhen_ON, @@OPTIONS AS OptionsValueWhen_ON;
GO

-- Test @@OPTIONS value changes with the setting of other options
SET IMPLICIT_TRANSACTIONS ON;
SELECT @@OPTIONS;
SET IMPLICIT_TRANSACTIONS OFF;
GO

SET ANSI_NULLS OFF;
SELECT @@OPTIONS;
SET ANSI_NULLS ON;
GO

SET QUOTED_IDENTIFIER ON;
SELECT @@OPTIONS;
SET QUOTED_IDENTIFIER OFF;
GO

SET NOCOUNT ON;
SELECT @@OPTIONS;
SET NOCOUNT OFF;
GO

SET XACT_ABORT ON;
SELECT @@OPTIONS;
SET XACT_ABORT OFF;
GO

